﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Sunimage.Spjg.Web.UserControls
{
    /// <summary>
    /// 使用ModalPopuExtender封装的信息提示控件，根据信息类型的不同显示不同的图标
    /// </summary>
    public partial class AlertMessage : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        /// <summary>
        /// 显示的文本信息内容
        /// </summary>
        // public string Message { get; set; }

        /// <summary>
        /// 显示警告信息
        /// </summary>
        /// <param name="message"></param>
        public void Warn(string message)
        {
            //不同的类型提示给出不同CssClass
            ltrMessageType.Text = "警告";
            lblMessage.Text = message;
            mpeAlert.Show();
        }

        /// <summary>
        /// 显示错误信息
        /// </summary>
        /// <param name="message"></param>
        public void Error(string message)
        {
            ltrMessageType.Text = "发生错误";
            lblMessage.Text = message;
            mpeAlert.Show();
        }

        /// <summary>
        /// 显示提示信息
        /// </summary>
        /// <param name="message"></param>
        public void Alert(string message)
        {
            ltrMessageType.Text = "提示";
            lblMessage.Text = message;
            mpeAlert.Show();
        }
    }
}